import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/system/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/system/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/system/user/logout',
    method: 'post'
  })
}

export function addUserApi(params) {
  return request.post('/system/user/addUser', params)
}

export function getUserListApi(params) {
  return request.get('/system/user/getUserList', { params })
}

export function modifyUserApi() {
  return request({
    url: '/system/user/modifyUser',
    method: 'post'
  })
}
